package com.polly.repository;

import domain.HomeworkInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

/**
 * @author liqin@nd.com.cn
 * @version V1.0
 * @title: HomeworkInfoDao
 * @description: TODO(用一句话描述该文件做什么)
 * @date: 2019/4/8 20:34
 */
@Mapper
@Repository
public interface HomeworkInfoDao {

    @Results({
            @Result(property = "homeworkId", column = "homework_id"),
            @Result(property = "paperId", column = "paper_id"),
            @Result(property = "paperName", column = "paper_name"),
            @Result(property = "goodRate", column = "good_rate"),
            @Result(property = "createTime", column = "create_time")
    })

    @Select("SELECT * FROM homework_info WHERE homework_id = #{homework_id}")
    HomeworkInfo findHomeworkInfoByHomeworkId(@Param("homework_id") String homeworkId);

}
